using SalesPages.DomainModel;
using System.ComponentModel.DataAnnotations;
using System.Data.Entity.ModelConfiguration;
namespace SalesPages.EntityFrameworkRepository.Mapping
{
    public class RioSMSTokenMap : EntityTypeConfiguration<RioSMSToken>
    {
        public RioSMSTokenMap()
        {
            // Primary Key
            this.HasKey(t => t.Phone);

            // Properties
            this.Property(t => t.Phone)
                .IsRequired()
                .HasMaxLength(50);

            // Table & Column Mappings
            this.ToTable("RioSMSToken");
            this.Property(t => t.Phone).HasColumnName("Phone");
            this.Property(t => t.SMSToken).HasColumnName("SMSToken");
            this.Property(t => t.CreatedDate).HasColumnName("CreatedDate");
            this.Property(t => t.UpdatedDate).HasColumnName("UpdatedDate");
            this.Property(t => t.DailySend).HasColumnName("DailySend");
        }
    }
}
